import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from './View/Main'
import Home from './View/Home'  //注意路由的书写！ 必须修改vue.config.js里面的内容
import StudentBasicInfo from "@/View/StudentInfo/StudentBasicInfo";
import Login from "@/View/Login";
import StudentCourseInfo from "@/View/StudentInfo/StudentCourseInfo";
import InnovativeAndPractices from "@/View/StudentInfo/InnovativeAndPractices";
import StudentHonorsInfo from "@/View/StudentInfo/StudentHonorsInfo";
import StudentDailyInfo from "@/View/StudentInfo/StudentDailyInfo";
import StudentLogInfo from "@/View/StudentInfo/StudentLogInfo";
import StudentSelectInfo from "@/View/StudentInfo/StudentSelectInfo";
import CardCost from "@/View/StudentInfo/CardCost";
import Statistics from "@/View/StudentInfo/Statistics";
Vue.use(VueRouter)

const routes = [
    {
        path:'/',
        name: 'login',
        component :  Login
    },
    {
        path: '/main',
        name: 'Main',
        component: Main,
        redirect:'/home',
        children: [
            {
                path: '/home',
                name: 'home',
                component: Home
            },
            {
                path:'/statistics',
                name:'statistics',
                component: Statistics
            },
            {
                path:'/studentBasicInfo',
                name:'studentBasicInfo',
                component: StudentBasicInfo
            },
            {
                // path:'/studentStudyInfo',
                // name:'studentStudyInfo',
                path:'/studentCourseInfo',
                name:'studentCourseInfo',
                component: StudentCourseInfo
            },
            {

                path:'/studentSelectInfo',
                name:'studentSelectInfo',
                component: StudentSelectInfo
            },
            {
                path:'/innovativeAndPractices',
                name:'innovativeAndPractices',
                component: InnovativeAndPractices
            },
            {
                path:'/studentHonorsInfo',
                name:'studentHonorsInfo',
                component: StudentHonorsInfo
            },
            {
                path:'/studentDailyInfo',
                name:'studentDailyInfo',
                component: StudentDailyInfo
            },
            {
                path:'/studentLogInfo',
                name:'studentLogInfo',
                component: StudentLogInfo
            },
            {
                path:'/CardCost',
                name:'CardCost',
                component: CardCost
            }
        ]
    }
]

const router = new VueRouter({
    mode: 'history',
    routes
})

export default router
